home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / PROGRAM / LDB171.ARJ / FMUTUAL.HPP < prev    next >
C/C++ Source or Header  |  1992-05-12  |  1KB  |  80 lines

  1. /*
  2.     fmutual.hpp -- Loose Data Binder v 1.7:
  3.         mutually owned and persistence
  4.         "form."
  5.  
  6.     (C) Copyright 1992  John W. Small
  7.     All rights reserved
  8.  
  9.     PSW / Power SoftWare
  10.     P.O. Box 10072
  11.     McLean, Virginia 22102 8072 USA
  12.     (703) 759-3838
  13.  
  14.     Clone this file to speed the development of
  15.     classes derived from a Mutual hierarchy.
  16.  
  17.     replace:    with something like:
  18.  
  19.     CLASS        Mint
  20.     CPTR        MinT
  21.     BASE        Mutual
  22. */
  23.  
  24.  
  25. #ifndef CLASS_HPP
  26. #define CLASS_HPP
  27.  
  28.  
  29. #ifndef BASE_HPP
  30. #include "BASE.hpp"
  31. #endif
  32.  
  33.  
  34. #define ID_CLASS  ???
  35. typedef class CLASS * CPTR;
  36. #define CPTR0  ((CPTR)0)
  37.  
  38.  
  39. class CLASS : public BASE  {
  40.  
  41.     // BASE must be public for type conversion
  42.     // to Mutual for polymorphic handling!
  43.  
  44.  
  45. private:
  46.  
  47.     /*  CLASS-declared data members  */
  48.  
  49.     int    initData(
  50.         // CLASS-declared data member initializers
  51.         );
  52.  
  53.  
  54. protected:
  55.  
  56.     CLASS   (initVFTs) : BASE(initVFTsEtc) {}
  57.     virtual void fput(ostream& os);
  58.     static  MutuaL fget(istream&, MutuaL InstancE);
  59.  
  60.  
  61. public:
  62.  
  63.     CLASS
  64.         (
  65.         // CLASS-declared data member initializers
  66.         // BASE-declared data member initializers
  67.         );
  68.     CLASS   (CLASS&);
  69.     static  void RegisterClass()
  70.         { Mutual::RegisterClass
  71.         (ID_CLASS,CLASS::fget); }
  72.     virtual int operator=(Mutual&);
  73.     virtual MutuaL clone();
  74.     virtual unsigned ID()  { return ID_CLASS; }
  75.     virtual ~CLASS();
  76.  
  77. };
  78.  
  79. #endif  /*  CLASS_HPP  */
  80.